﻿@using GBFinance.Entity;
@using HiLand.Utility4.MVC.Controls
@using HiLand.Framework.BusinessCore
@{
    ViewBag.Title = "SubmitApplication";
    Layout = this.ViewData["_Layout"].ToString();
}
<h1>
    Submit Application
</h1>
<div id="outterFormContainer">
    @using (Html.BeginForm())
    { 
        <fieldset id="submitApplicationDetails" class="simpleFieldset">
            <legend>[Privacy Act Authorisation]</legend>
            @Html.HiCheckBox().Name("IsAgreeTerm").Lable("").Description(" I agree to the above authorisation.").Render()
            @Html.HiTextBox().Lable("Full Name").Name("SignedFullName").Render()
        </fieldset>
    }
</div>
<div class="bottombtns">
    <a href="@Url.Action("Index")" class="green2" style="float: left">BACK</a> <a href="#"
        id="aNext" class="green2" style="float: right">SUBMIT</a>
</div>
<script type="text/javascript">
    $(document).ready(function () {
        $("#process #SubmitApplication").addClass("activedprocess");
        $("#process #SubmitApplication a").addClass("activedprocesstxt");

        $("#aNext").click(function () {
            $("#outterFormContainer form").ajaxSubmit({
                success: function (responseText) {
                    if (responseText.IsSuccessful == true) {
                        window.location = '@Url.Action("FinalStep")';
                    }
                    else {
                        alert("Failure");
                    }
                },
                data: { "isAjaxDeal": "true" }
            });
        });
    });
</script>
